import request from '@/utils/request'

// 查询账单规则列表
export function listMoneyRules(query) {
  return request({
    url: '/business/moneyRules/list',
    method: 'get',
    params: query
  })
}

// 查询账单规则详细
export function getMoneyRules(id) {
  return request({
    url: '/business/moneyRules/' + id,
    method: 'get'
  })
}

// 新增账单规则
export function addMoneyRules(data) {
  return request({
    url: '/business/moneyRules',
    method: 'post',
    data: data
  })
}

// 修改账单规则
export function updateMoneyRules(data) {
  return request({
    url: '/business/moneyRules',
    method: 'put',
    data: data
  })
}

// 删除账单规则
export function delMoneyRules(id) {
  return request({
    url: '/business/moneyRules/' + id,
    method: 'delete'
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/moneyRules/export',
    method: 'post',
    data: data
  })
}

// 刷新缓存
export function refreshCache() {
  return request({
    url: '/business/moneyRules/refreshCache',
    method: 'delete'
  })
}

// 状态变更
export function updateChangeStatus(data){
  return request({
    url: '/business/moneyRules/changeStatus',
    method: 'put',
    params: data
  })
}
